package com.judian.smart.model;


public class VoiceInfo {

    private int Id;
    private String VoiceName;
    private String VoiceAnswer;
    private String VoiceAction;
    private String UserName;

    /**
     * @return the id
     */
    public int getId() {
        return Id;
    }

    /**
     * @param id the id to set
     */
    public void setId(int id) {
        Id = id;
    }

    /**
     * @return the voiceName
     */
    public String getVoiceName() {
        // YYX:2018/12/28 判断智能问答提问语句是否有回车符
//        String voiceName = "";
//        for (char vn : VoiceName.toCharArray()) {
//            if (vn != '\n')
//                voiceName += vn;
//        }
        return VoiceName;
    }

    /**
     * @param voiceName the voiceName to set
     */
    public void setVoiceName(String voiceName) {
        VoiceName = voiceName;
    }

    /**
     * @return the voiceAnswer
     */
    public String getVoiceAnswer() {
        if (VoiceAnswer == null || VoiceAnswer == "null") {
            VoiceAnswer = "";
        }
        // YYX:2018/12/28 判断智能问答 回答语句是否有回车符
//        String voiceAnswer = "";
//        for (char vn : VoiceAnswer.toCharArray()) {
//            if (vn != '\n')
//                voiceAnswer += vn;
//        }
        return VoiceAnswer;
    }

    /**
     * @param voiceAnswer the voiceAnswer to set
     */
    public void setVoiceAnswer(String voiceAnswer) {
        VoiceAnswer = voiceAnswer;
    }

    /**
     * @return the voiceAction
     */
    public String getVoiceAction() {
        if (VoiceAction == null || VoiceAction == "null") {
            VoiceAction = "";
        }
        return VoiceAction;
    }

    /**
     * @param voiceAction the voiceAction to set
     */
    public void setVoiceAction(String voiceAction) {
        VoiceAction = voiceAction;
    }

    /**
     * @return the userName
     */
    public String getUserName() {
        if (UserName == null || UserName == "null") {
            UserName = "";
        }
        return UserName;
    }

    /**
     * @param userName the userName to set
     */
    public void setUserName(String userName) {
        UserName = userName;
    }

    public String convertTostring() {

        String result = getId() + ";" + getVoiceName() + ";" + getVoiceAnswer()
                + ";" + getVoiceAction() + ";" + getUserName();

        return result;
    }
}